package com.example.wentongwang.sports.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;

import com.example.wentongwang.sports.R;

/**
 * Created by Wentong WANG on 2016/5/9.
 */
public class LoginActivity extends Activity implements View.OnClickListener{
    private Button loginBtn;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            //getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }

        setContentView(R.layout.login_activity_layout);

        initViews();

        initEvents();
    }

    private void initEvents() {
        loginBtn.setOnClickListener(this);
    }

    private void initViews() {
        loginBtn = (Button) findViewById(R.id.btn_sign_in);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_sign_in:
                Intent it = new Intent();
                it.setClass(LoginActivity.this, HomeActivity.class);
                startActivity(it);
                break;
        }
    }
}
